home *** CD-ROM | disk | FTP | other *** search
/ Red Eye Press Kit / Red Eye Press Kit.iso / pc / main.dxr / SCRIPTS_78_DOWNLOAD.ls < prev    next >
Encoding:
Text File  |  2005-07-18  |  1.9 KB  |  52 lines

  1. property download, fileSeperator, projectName
  2. global downloadList
  3.  
  4. on getPropertyDescriptionList me
  5.   description = [:]
  6.   addProp(description, #projectName, [#default: EMPTY, #format: #string, #comment: "SAVE FOLDER NAME:"])
  7.   addProp(description, #download, [#default: EMPTY, #format: #string, #comment: "DOWNLOAD:", #range: ["DESKTOP", "OTHER"]])
  8.   return description
  9. end
  10.  
  11. on beginSprite me
  12.   fileSeperator = fileSeperator()
  13. end
  14.  
  15. on mouseUp me
  16.   if downloadList.count = 0 then
  17.   else
  18.     if download = "DESKTOP" then
  19.       savePath = baSysFolder("desktop")
  20.     else
  21.       myFile = new(xtra("fileio"))
  22.       setFilterMask(myFile, "Folder")
  23.       savePath = displaySave(myFile, "Download", "save here")
  24.       myFile = 0
  25.       the itemDelimiter = fileSeperator
  26.       lastPath = savePath.item[savePath.item.count]
  27.       savePath = savePath.item[1..savePath.item.count - 1]
  28.       the itemDelimiter = "."
  29.       if lastPath.item.count = 2 then
  30.         lastPath = lastPath.item[1]
  31.       end if
  32.       if lastPath = "save here" then
  33.         savePath = savePath & fileSeperator
  34.       else
  35.         savePath = savePath & fileSeperator & lastPath & fileSeperator
  36.       end if
  37.     end if
  38.     savePath = savePath & projectName & fileSeperator
  39.     repeat with x = 1 to downloadList.count
  40.       filePath = the moviePath & downloadList[x][1] & fileSeperator & downloadList[x][2] & "." & downloadList[x][3]
  41.       saveFile = savePath & downloadList[x][1] & fileSeperator & downloadList[x][2] & "." & downloadList[x][3]
  42.       copyFile = baCopyFileProgress(filePath, saveFile, "always", "download location", "cancel", 0)
  43.     end repeat
  44.     captions = "CAPTIONS" & fileSeperator & "CAPTIONS.DOC"
  45.     filePath = the moviePath & captions
  46.     saveFile = savePath & captions
  47.     copyFile = baCopyFileProgress(filePath, saveFile, "always", "download location", "cancel", 0)
  48.     downloadList = []
  49.     go("DOWNLOAD")
  50.   end if
  51. end
  52.